package com.kool.kmetrics.constant;

/**
 * @author luyu
 * @date 2021-04-19 22:59
 */
public class MetricsRedisKey {

    /**
     * 参数1：日期
     * 参数2：报文类型 {@link com.kool.kmetrics.constant.PacketTypeEnum}
     * 参数3：global/user_name/client_id/remote_address
     * 参数4：global/用户名/客户端ID/客户端地址
     */
    public static final String KEY_TODAY_RECEIVE_SUCCESS = "kmetrics:today_receive_success:%s:%s:%s:%s";
    public static final String KEY_TODAY_RECEIVE_FAIL = "kmetrics:today_receive_fail:%s:%s:%s:%s";
    public static final String KEY_TODAY_RECEIVE_TOTAL = "kmetrics:today_receive_total:%s:%s:%s:%s";
    public static final String KEY_TODAY_RECEIVE_COST_SUM = "kmetrics:today_receive_cost_sum:%s:%s:%s:%s";
    public static final String KEY_TODAY_RECEIVE_COST_AVG = "kmetrics:today_receive_cost_avg:%s:%s:%s:%s";
    public static final String KEY_TODAY_RECEIVE_COST_MAX = "kmetrics:today_receive_cost_max:%s:%s:%s:%s";

    /**
     * 参数1：日期
     * 参数2：主题名
     * 参数3：global/user_name/client_id/remote_address
     * 参数4：global/用户名/客户端ID/客户端地址
     */
    public static final String KEY_TODAY_TOPIC_RECEIVE_SUCCESS = "kmetrics:today_topic_receive_success:%s:%s:%s:%s";

    /**
     * 参数1：日期
     * 参数2：报文类型 {@link com.kool.kmetrics.constant.PacketTypeEnum}
     * 参数3：global/user_name/client_id/remote_address
     * 参数4：global/用户名/客户端ID/客户端地址
     */
    public static final String KEY_TODAY_SEND_SUCCESS = "kmetrics:today_send_success:%s:%s:%s:%s";
    public static final String KEY_TODAY_SEND_FAIL = "kmetrics:today_send_fail:%s:%s:%s:%s";
    public static final String KEY_TODAY_SEND_TOTAL = "kmetrics:today_send_total:%s:%s:%s:%s";

    /**
     * 参数1：日期
     * 参数2：主题名
     * 参数3：global/user_name/client_id/remote_address
     * 参数4：global/用户名/客户端ID/客户端地址
     */
    public static final String KEY_TODAY_TOPIC_SEND_SUCCESS = "kmetrics:today_topic_send_success:%s:%s:%s:%s";

    /**
     * 参数1：分钟，yyyyMMddHHmm
     */
    public static final String KEY_SESSION_CNT = "kmetrics:session_cnt:%s";
}
